<style scoped lang="less">
  input[type="radio"]{
    vertical-align:sub;
    width:15px;
    height:15px;
    border: 1px solid #4169E2;
    border-radius: 50%;
    outline:none;
    appearance:none;
    -moz-appearance:none; /* Firefox */
    -webkit-appearance:none; /* Safari 和 Chrome */
    transform: translateY(-2px);
  }
  input[type="radio"]:checked{
    background: #4169E2;
  }
  .car-combg{
    background: url("../../static/image/o_15.png") center;
  }
  .cars-box{
    border: 1px solid #ddd;
    margin-top: 30px;
    #box-width{
      width:1300px;
      margin:0 auto;
    }
    .condition-box{
      padding-left: 50px;
      padding-top: 20px;
    }
    .title{
      font-size: 28px;
      color: #231E7C;
      letter-spacing: 1px;
    }
    .condition{
      padding-top: 10px;
      font-size: 20px;
      color: #231E7C;
      letter-spacing: 1px;
    }
    .iptd{
      padding-top: 10px;
      font-size: 16px;
    }
    .hasno{
      padding-top: 5px;
      font-size: 18px;
    }
    .cars-list{
      margin-left: 259px;
      .choose-list{
        position: relative;
        width: 25%;
        padding: 20px 30px;
        border-left: 1px solid #ddd;
        .img-box{
          height: 120px;
          overflow: hidden;
          text-align: center;
          img{
            width: 100%;
          }
        }
        .car-name{
          font-size: 14px;
          line-height: 25px;
          font-weight: bold;
          letter-spacing: 1px;
          height:50px;
          padding:0 20px;
          margin: 10px 0;
          word-break: break-all;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2;
          overflow: hidden;
        }
        .nocar{
          font-size: 16px;
          color: #aaa;
          height:70px;
          line-height: 70px;
          text-align: center;
        }
        .car-arrow{
          position: absolute;
          top: 20px;
          right: 30px;
          cursor: pointer;
        }
        .choose{
          text-align: center;
          border: 1px solid #aaa;
          font-size: 16px;
          cursor: pointer;
          line-height: 30px;
          color: #4169E2;
          letter-spacing: 2px;
          position: relative;
        }
        .crumbs{
          line-height: 30px;
          font-size: 16px;
          border: 1px solid #aaa;
          border-top: none;
          padding: 0 10px;
          position: absolute;
          left: 30px;
          right: 30px;
          top: 242px;
          height: 30px;
          overflow: hidden;
          background: #fff;
        }
        .lette-list{
          top: 272px;
          position: absolute;
          z-index: 4;
          line-height: 25px;
          background: #DAF2FE;
          width: 30px;
          text-align: center;
          color: #4169E2;
          .lette-item{
            cursor: pointer;
          }
          .lette-item:hover {
            background: #4169E2;
            color: #fff;
          }
          .active-item{
            background: #4169E2;
            color: #fff;
          }
        }
        .carp-box{
          position: absolute;
          left: 30px;
          top: 0;
          width: 168px;
          text-align: left;
          height: 650px;
          overflow-y: scroll;
          background: #fff;
          dt{
            padding: 0 10px;
            line-height: 25px;
            font-size: 18px;
            background: #DAF2FE;
          }
          dd{
            color: #000;
            font-size: 15px;
            line-height: 25px;
            padding: 0 10px;
            cursor: pointer;
          }
          dd:hover{
            background: #4169E2;
            color: #fff;
          }
        }
        .car-s-box{
          top: 272px;
          position: absolute;
          z-index: 4;
          left: 30px;
          right: 30px;
          .name-box{
            line-height: 30px;
            font-size: 18px;
            background: #DAF2FE;
            color: #4169E2;
            padding: 0 10px;
          }
          .car-s-name{
            background: #fff;
            line-height: 30px;
            font-size: 15px;
            max-height: 300px;
            overflow-y: auto;
            .car-s-item{
              padding-left: 10px;
              cursor: pointer;
            }
            .car-s-item:hover{
              background: #007aff;
              color: #fff;
            }
          }
        }
        .car-x-box{
          top: 272px;
          position: absolute;
          z-index: 4;
          width: 300px;
          .name-box{
            font-size: 18px;
            padding-left: 10px;
            background: #DAF2FE;
            color: #4169E2;
          }
          .carx-list{
            background: #fff;
            line-height: 30px;
            font-size: 16px;
            max-height: 300px;
            overflow-y: auto;
            .carx-item{
              cursor: pointer;
              padding: 0 10px;
              .price{
                color: red
              }
            }
            .carx-item:hover{
              background: #4169E2;
              color: #fff;
              .price{
                color: #fff;
              }
            }
          }
        }
      }
    }
  }
  #price{
    display: none;
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
    text-align: center;
    padding-bottom: 10px;
    color: red;
  }
  #carl-box{
    height: 276px;
  }
  .car-parameter{
    padding-top: 20px;
    position: relative;
    li{
      .parameter-type{
        line-height: 60px;
        font-size: 18px;
        letter-spacing: 1px;
        background: #D9EBFF;
        padding-left: 20px;
        border: 1px solid #ccc;
        border-bottom: none;
        border-top: none;
        font-weight: bold;
        color: #231E7C;
      }
    }
    li:nth-child(1) {
      .parameter-type{
        border-top: 1px solid #ccc;
      }
    }
  }
  .sus-car{
    border: 1px solid #ddd;
    padding: 0 20px;
    position: fixed;
    background: #D9EBFF;
    top: 0;
    width: 1300px;
    margin: 0 auto;
    z-index: 9999;
    .title{
      font-size: 28px;
      color: #231E7C;
      letter-spacing: 1px;
      padding:20px 30px;
    }
    .list{
      margin-left: 250px;
      li{
        width: 25%;
        padding: 20px 30px;
        border-left: 1px solid #ddd;
        box-sizing: border-box;
        .car-name{
          font-size: 16px;
          line-height: 25px;
          font-weight: bold;
          letter-spacing: 2px;
          text-align: center;
          height: 70px;
          padding: 10px 10px;
        }
        .price{
          text-align: center;
          color: #DE6386;
          font-size: 12px;
          padding: 0 0 10px;
        }
        .choose{
          padding: 0 10px;
        }
        .nocar{
          padding: 30px 50px;
        }
      }
    }
  }
  .suspension{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 4;
    margin-top: 0;
    border: none !important;
    #box-width{
      background: #E5F3FF;
      box-shadow: 0 0 10px #aaa;
    }
    /*#configuration{*/
      /*display: none;*/
    /*}*/
    .choose-list{
      padding: 50px 30px !important;
    }
    #car-img{
      display: none;
    }
    .car-arrow{
      display: none;
    }
    #price{
      display: block;
    }
    #nocar-price{
      display: block;
    }
    .crumbs{
      top: 151px !important;
    }
    .lette-list{
      top: 181px !important;
    }
    .car-s-box{
      top: 181px !important
    }
    .car-x-box{
      top: 181px !important
    }
  }
  #nocar-price{
    display: none;
    height: 29px;
  }
</style>

<style lang="less">
  .parameter-name{
    font-size: 16px;
  }
  .parameter-value{
    font-weight: bold;
  }
</style>

<template>
  <div>
    <div>
      <Header></Header>
    </div>
    <div class="car-combg">
      <div class="main-body">
        <div class="main-content">
          <div>
            <Crumbs></Crumbs>
          </div>
          <div id="carl-box">
            <div class="cars-box">
              <div id="box-width">
                <div class="left condition-box">
                  <p class="title">
                    车型信息
                  </p>
                  <div id="configuration">
                    <p class="condition">
                      配置状况
                    </p>
                    <p class="iptd">
                      <input type="radio" checked name="radio"/>
                      <span>
                标配
              </span>
                </p>
                <p class="iptd">
                  <input type="radio"  name="radio"/>
                  <span>
                选配
              </span>
                </p>
                <p class="hasno">
                  -- 无
                </p>
              </div>
            </div>
            <div class="cars-list">
              <ul>
                <li v-for="(car, index) in selectedCar" class="left choose-list">
                  <p id="car-img" class="img-box">
                    <img :src="car.img">
                  </p>
                  <div>
                    <p v-if="car.selected" class="car-name">
                      {{ car.nameS + ' ' + car.nameX }}
                    </p>
                    <p v-else class="nocar">
                      暂无车型
                    </p>
                  </div>
                  <div>
                    <div v-if="car.price !== ''" id="price">
                      厂商指导价： {{ car.price }}
                    </div>
                    <div v-else id="nocar-price"></div>
                  </div>
                  <div @click="chooseStar(index)" class="choose">
                    {{ car.text }}
                  </div>
                  <div @click="del(index)" v-if="car.selected" class="car-arrow">
                    <img src="../../static/image/cuowu.png">
                  </div>
                  <div v-if="car.choose" class="crumbs">
                  <span @click="toCarP(index)" style="cursor: pointer">
                     品牌
                  </span>
                    <span  v-if="car.stageS || car.stageX">
                    >
                    <span @click="toCarS(index)" style="cursor: pointer">
                      车系
                    </span>
                  </span>
                    <span v-if="car.stageX">
                    >
                    <span style="cursor: pointer">
                      车型
                    </span>
                  </span>
                  </div>
                  <div v-if="car.stageP" class="lette-list">
                    <div>
                      <ul>
                        <li @click="changeL(index, lIndex)" :class="lIndex === car.lIndex? 'active-item' : ''" class="lette-item" v-for="(lette, lIndex) in car.letteList">
                          {{ lette }}
                        </li>
                      </ul>
                    </div>
                    <div class="carp-box">
                      <dl v-for="(carP, carLIndex) in car.carPlist">
                        <dt>
                          {{ carP.le }}
                        </dt>
                        <dd @click="chooseS(index, carPName)" v-for="(carPName, carPIndex) in carP.carP">
                          {{ carPName.ca_name }}
                        </dd>
                      </dl>
                    </div>
                  </div>
                  <div v-if="car.stageS" class="car-s-box">
                    <div class="name-box">
                      {{ car.nameP }}
                    </div>
                    <div class="car-s-name">
                      <ul>
                        <li @click="chooseX(index, carS)" v-for="(carS, carSindex) in car.carSlist" class="car-s-item">
                          {{ carS.ca_name }}
                        </li>
                      </ul>
                    </div>
                  </div>
                  <div v-if="car.stageX" class="car-x-box">
                    <div class="name-box">
                      {{ car.nameP }} > {{ car.nameS }}
                    </div>
                    <div class="carx-list">
                      <ul>
                        <li @click="chooseFin(index, carX)" v-for="(carX, carXindex) in car.carXlist" class="carx-item">
                          <div class="left" style="width:180px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
                            {{ carX.mo_name }}
                          </div>
                          <div class="right price">
                            {{ carX.mo_guide_price }}
                          </div>
                          <div class="clear"></div>
                        </li>
                      </ul>
                    </div>
                  </div>
                </li>
                <div class="clear"></div>
              </ul>
            </div>
            <div class="clear"></div>
          </div>
        </div>
          </div>
        <div class="car-parameter">
          <div>
            <ul>
              <li>
                <div class="parameter-type">
                  基本参数
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter1"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  车身
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter2"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  发动机
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter3"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  变速箱
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter4"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  底盘转向
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter5"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  车轮制动
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter6"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  安全装备
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter7"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  操控配置
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter8"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  外部配置
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter9"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  内部配置
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter10"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  高科技配置
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter11"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  座椅配置
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter12"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  多媒体配置
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter13"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  灯光配置
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter14"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  玻璃/后视镜
                  </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter15"></Table>
              </li>
              <li>
                <div class="parameter-type">
                  空调/冰箱
                </div>
                <Table size="large" border :show-header="false" :columns="columns" :data="parameter16"></Table>
                </li>
            </ul>
          </div>
        </div>
        <div style="color: #F93938;font-size: 15px; font-weight: bold;padding-top: 20px;letter-spacing: 1px;">
          注：1、以上参数配置信息仅供参考
        </div>
      </div>
    </div>
  </div>
    <div>
      <Footer></Footer>
    </div>
  </div>
</template>

<script>
  import Header from './Header'
  import Footer from './Footer'
  import Crumbs from './Crumbs'
  import { mapState } from 'vuex'
  import 'iview/dist/styles/iview.css'
  import 'element-ui/lib/theme-chalk/index.css'
  let $ = require('jquery')
  export default {
    name: 'CarCompare',
    components: {
      'Header': Header,
      'Footer': Footer,
      'Crumbs': Crumbs
    },
    computed: mapState({
      crumbs: state => state.crumbs
    }),
    data () {
      return {
        selectedBak: {},
        selectedCar: [{
          img: '../../static/image/o_20.png',
          selected: false,
          name: '',
          allowC: true,
          choose: false,
          stageP: false,
          stageS: false,
          stageX: false,
          price: '',
          nameP: '',
          nameS: '',
          nameX: '',
          sid: -1,
          text: '选择车型',
          lIndex: 0,
          carPIndex: -1,
          carSIndex: -1,
          carXIndex: -1,
          carPlist: [],
          carSlist: [],
          carXlist: [],
          letteList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
        }, {
          img: '../../static/image/o_20.png',
          selected: false,
          name: '',
          allowC: true,
          choose: false,
          stageP: false,
          stageS: false,
          stageX: false,
          price: '',
          nameP: '',
          nameS: '',
          nameX: '',
          sid: -1,
          text: '选择车型',
          lIndex: 0,
          carPIndex: -1,
          carSIndex: -1,
          carXIndex: -1,
          carPlist: [],
          carSlist: [],
          carXlist: [],
          letteList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
        }, {
          img: '../../static/image/o_20.png',
          selected: false,
          name: '',
          allowC: true,
          choose: false,
          stageP: false,
          stageS: false,
          stageX: false,
          price: '',
          nameP: '',
          nameS: '',
          nameX: '',
          sid: -1,
          text: '选择车型',
          lIndex: 0,
          carPIndex: -1,
          carSIndex: -1,
          carXIndex: -1,
          carPlist: [],
          carSlist: [],
          carXlist: [],
          letteList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
        }, {
          img: '../../static/image/o_20.png',
          selected: false,
          name: '',
          allowC: true,
          choose: false,
          stageP: false,
          stageS: false,
          stageX: false,
          price: '',
          nameP: '',
          nameS: '',
          nameX: '',
          sid: -1,
          text: '选择车型',
          lIndex: 0,
          carPIndex: -1,
          carSIndex: -1,
          carXIndex: -1,
          carPlist: [],
          carSlist: [],
          carXlist: [],
          letteList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
        }],
        columns: [
          {
            title: 'Name',
            key: 'parameter',
            align: 'right',
            className: 'parameter-name'
          },
          {
            title: 'value1',
            name: 'value1',
            className: 'parameter-value',
            render: (h, param) => {
              if (param.row.value1 === '标配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '15px',
                      height: '15px',
                      background: '#4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value1 === '适配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '14px',
                      height: '14px',
                      border: '1px solid #4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value1 === '无') {
                return h('div', [
                  h('span', {
                  }, '--')
                ])
              } else {
                return h('div', [
                  h('span', {
                    workBreak: 'break-all',
                    fontSize: '16px'
                  }, param.row.value1)
                ])
              }
            }
          },
          {
            title: 'value2',
            name: 'value2',
            className: 'parameter-value',
            render: (h, param) => {
              if (param.row.value2 === '标配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '15px',
                      height: '15px',
                      background: '#4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value2 === '适配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '14px',
                      height: '14px',
                      border: '1px solid #4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value2 === '无') {
                return h('div', [
                  h('span', {
                  }, '--')
                ])
              } else {
                return h('div', [
                  h('span', {
                    workBreak: 'break-all',
                    fontSize: '16px'
                  }, param.row.value2)
                ])
              }
            }
          },
          {
            title: 'value3',
            name: 'value3',
            className: 'parameter-value',
            render: (h, param) => {
              if (param.row.value3 === '标配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '15px',
                      height: '15px',
                      background: '#4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value3 === '适配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '14px',
                      height: '14px',
                      border: '1px solid #4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value3 === '无') {
                return h('div', [
                  h('span', {
                  }, '--')
                ])
              } else {
                return h('div', [
                  h('span', {
                    workBreak: 'break-all',
                    fontSize: '16px'
                  }, param.row.value3)
                ])
              }
            }
          },
          {
            title: 'value4',
            name: 'value4',
            className: 'parameter-value',
            render: (h, param) => {
              if (param.row.value4 === '标配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '15px',
                      height: '15px',
                      background: '#4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value4 === '适配') {
                return h('div', [
                  h('span', {
                    style: {
                      display: 'inline-block',
                      width: '14px',
                      height: '14px',
                      border: '1px solid #4169E2',
                      borderRadius: '50%'
                    }
                  })
                ])
              } else if (param.row.value4 === '无') {
                return h('div', [
                  h('span', {
                  }, '--')
                ])
              } else {
                return h('div', [
                  h('span', {
                    style: {
                      workBreak: 'break-all',
                      fontSize: '16px'
                    }
                  }, param.row.value4)
                ])
              }
            }
          }
        ],
        parameter1: [
          {
            parameter: '车型名称',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '进口类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '厂商指导价(元)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '厂商',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '发动机',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '变速箱',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '排量(L)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '长*宽*高(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车身结构',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '最高车速(km/h)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '官方0-100km/h加速(s)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '美国环保署标准油耗',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter2: [
          {
            parameter: '长度(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '宽度(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '高度(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '轴距(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前轮距(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后轮距(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排头部空间(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第二排头部空间(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排肩部空间(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第二排肩部空间(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '整备质量(kg)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车身结构',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车身材质',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车门数(个)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '座位数(个)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排车门开启方式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '邮箱容积(L)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第二油箱',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '货箱尺寸(mm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter3: [
          {
            parameter: '发动机(ml)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '进气形式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '气缸排列形式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '汽缸数(个)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '每缸气门数(个)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '配气结构',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '最大马力(Ps)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '最大功率(kw)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '最大功率转速(rmp)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '最大扭矩(N·m)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '最大扭矩转速(rpm)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '燃料形式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '供油方式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '缸盖材料',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '缸体材料',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter4: [
          {
            parameter: '变速箱',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '档位个数',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '变速箱类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter5: [
          {
            parameter: '驱动方式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '四驱形式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '中央差速器结构',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前悬架类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后悬架类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '助力类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车体结构',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter6: [
          {
            parameter: '前制动器类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后制动器类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '驻车制动类型',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前轮胎规格',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后轮胎规格',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '备胎规格',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter7: [
          {
            parameter: '主驾驶安全气囊',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '副驾驶安全气囊',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排侧气囊',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排侧气囊',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排头部气囊(气帘)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排头部气囊(气帘',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '膝部气囊',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排安全带式气囊',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '胎压监测装置',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '零胎压继续行驶',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '安全带未系提醒',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: 'ISOFIX儿童座椅接口',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '发动机电子防盗',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车内中控锁',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '遥控钥匙',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '无钥匙启动系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '无钥匙进入系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter8: [
          {
            parameter: 'ABS防抱死',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '制动力分配(EBD/CBC等)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '刹车辅助(EBA/BAS/BA等)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '牵引力控制(ASR/TCS/TRC等)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车身稳定控制(ESC/ESP/DSC等)',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '自动驻车',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '可变悬架',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '空气悬架',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '多地形可选驾驶系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前桥限滑差速器/差速锁',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '中央差速器锁止功能',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后桥限滑差速器/差速锁',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter9: [
          {
            parameter: '电动天窗',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '全景天窗',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '铝合金轮圈',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '电动吸合门',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '侧滑门',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '电动后备箱',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后备箱遥控开启',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '感应后备厢',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车顶行李架',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '外侧踏板',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '金属漆',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter10: [
          {
            parameter: '真皮方向盘',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '方向盘调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '方向盘电动调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '多功能方向盘',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '方向盘换挡',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '放线盘加热',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '方向盘记忆',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '真木内饰',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '定速巡航',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前驻车雷达',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后驻车雷达',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '倒车视频影像',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '行车电脑显示屏',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '全液晶仪表盘',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: 'HUD抬头数字显示',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter11: [
          {
            parameter: '自动泊车入位',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '发动机启停技术',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '并线辅助',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车道偏离预警系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '倒车防撞制动系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '整体主动转向系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '夜视系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '语音识别/声控系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '中控液晶屏分屏显示',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '自适应巡航',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '全景摄像头',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车库门遥控开启',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '防盗窃警报',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter12: [
          {
            parameter: '座椅材质',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前仿形多轮廓座椅',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后仿形多轮廓座椅',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '运动风格座椅',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '座椅高低调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '腰部支撑调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '肩膀部支撑调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '主驾驶座电动调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '副驾驶座电动调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第二排双独立座椅',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排座椅电动调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排老板键',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '电动座椅记忆',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排座椅记忆',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排电动头枕',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排电动头枕',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排座椅加热',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排座椅加热',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排座椅通风',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排座椅通风',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前排座椅按摩',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排座椅按摩',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排头等舱式独立座椅',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排座椅放倒方式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第三排座椅',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第三排座椅放倒方式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第二/第三排座椅可拆除',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前中央扶手',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后中央扶手',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排小桌板',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排腿托',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排杯架',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter13: [
          {
            parameter: 'GPS导航系统',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '定位互动服务',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '中控台彩色大屏',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '蓝牙/车载电话',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车载电视',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排液晶屏',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '外接音源接口',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: 'CD支持MP3/WMA',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '扬声器品牌',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter14: [
          {
            parameter: '近光灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '远光灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: 'LED刹车灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '日间行车灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '自动头灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '自适应远近光',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '转向辅助灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '转向头灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '前雾灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '大灯高度可调',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '大灯清洗装置',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车内氛围灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '迎宾踏板灯',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '大灯延时关闭',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter15: [
          {
            parameter: '前电动车窗',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后电动车窗',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '第三排车窗可开启',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车窗防夹手功能',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后视镜电动调节',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后视镜加热',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '内后视镜自动防炫目',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '外后视镜自动防炫目',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后视镜电动折叠',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后视镜记忆',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '外后视镜倒车自动翻转',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后风挡遮阳帘',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排侧遮阳帘',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排隐私玻璃',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '遮阳板化妆镜',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后雨刷',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '感应雨刷',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ],
        parameter16: [
          {
            parameter: '空调控制方式',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后排独立空调',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '后座出风口',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '温度分区控制',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '四区独立温控',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车内空气调节/花粉过滤',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          },
          {
            parameter: '车载冰箱',
            value1: '',
            value2: '',
            value3: '',
            value4: ''
          }
        ]
      }
    },
    methods: {
      // 获取车品牌
      getCarP: function () {
        let that = this
        that.$chaos.ajax({
          url: '/Car/getCarCateList',
          callback: function (type, res) {
            if (type === 'success') {
              let list = res.result.list
              let letteList = [{le: 'A', carP: list.A}, {le: 'B', carP: list.B}, {le: 'C', carP: list.C}, {le: 'D', carP: list.D}, {le: 'E', carP: list.E}, {le: 'F', carP: list.F}, {le: 'G', carP: list.G}, {le: 'H', carP: list.H}, {le: 'I', carP: list.I}, {le: 'J', carP: list.J}, {le: 'K', carP: list.K}, {le: 'L', carP: list.L}, {le: 'M', carP: list.M}, {le: 'N', carP: list.N}, {le: 'O', carP: list.O}, {le: 'P', carP: list.P}, {le: 'Q', carP: list.Q}, {le: 'R', carP: list.R}, {le: 'S', carP: list.S}, {le: 'T', carP: list.T}, {le: 'U', carP: list.U}, {le: 'V', carP: list.V}, {le: 'W', carP: list.W}, {le: 'X', carP: list.X}, {le: 'Y', carP: list.Y}, {le: 'Z', carP: list.Z}]
              that.selectedCar[0].carPlist = letteList
              that.selectedCar[1].carPlist = letteList
              that.selectedCar[2].carPlist = letteList
              that.selectedCar[3].carPlist = letteList
              that.selectedBak = letteList
              // this.selectedBak = JSON.parse(JSON.stringify(this.selectedCar[0]))
            }
          }
        })
      },
      // 开始选择
      chooseStar: function (index) {
        let that = this
        if (that.selectedCar[index].allowC) {
          that.selectedCar[index].choose = true
          that.selectedCar[index].stageP = true
          that.selectedCar[index].allowC = false
        } else {
          that.selectedCar[index].choose = false
          that.selectedCar[index].stageP = false
          that.selectedCar[index].stageS = false
          that.selectedCar[index].stageX = false
          that.selectedCar[index].allowC = true
        }
      },
      changeL: function (index, lIndex) {
        let that = this
        let num = 0
        for (var i = 0; i < lIndex; i++) {
          num = that.selectedCar[0].carPlist[i].carP.length + 1 + num
        }
        num = num * 25
        that.selectedCar[index].lIndex = lIndex
        $('.carp-box').scrollTop(num)
      },
      chooseS: function (index, car) {
        let that = this
        let id = car.ca_id
        that.$chaos.ajax({
          url: '/Car/getCarCateNextList',
          data: {
            ca_id: id
          },
          callback: function (type, res) {
            if (type === 'success') {
              that.selectedCar[index].nameP = car.ca_name
              that.selectedCar[index].carSlist = res.result.list
              that.selectedCar[index].stageS = true
              that.selectedCar[index].stageP = false
              that.selectedCar[index].sid = id
            }
          }
        })
      },
      chooseX: function (index, car) {
        let that = this
        let sid = that.selectedCar[index].sid
        let name = car.ca_name
        let id = car.ca_id
        that.$chaos.ajax({
          url: '/Car/getComboCarList',
          data: {
            cate_id: id,
            cate_pid: sid
          },
          callback: function (type, res) {
            if (type === 'success') {
              that.selectedCar[index].nameS = name
              that.selectedCar[index].carXlist = res.result.list
              that.selectedCar[index].stageX = true
              that.selectedCar[index].stageS = false
            }
          }
        })
      },
      chooseFin: function (index, car) {
        let that = this
        that.selectedCar[index].nameX = car.mo_name
        that.selectedCar[index].img = car.mo_image
        that.selectedCar[index].price = car.mo_guide_price
        that.selectedCar[index].selected = true
        that.selectedCar[index].stageX = false
        that.selectedCar[index].choose = false
        that.selectedCar[index].allowC = true
        that.selectedCar[index].text = '换辆车'
        that.$chaos.ajax({
          url: '/Car/getMotorcarDetail',
          data: {
            mo_id: car.mo_id
          },
          callback: function (type, res) {
            if (type === 'success') {
              let list = res.result.list
              // 基本参数
              that.parameter1[0]['value' + (index + 1)] = that.selectedCar[index].nameS + '' + that.selectedCar[index].nameX
              that.parameter1[1]['value' + (index + 1)] = list.mo_import_type
              that.parameter1[2]['value' + (index + 1)] = list.mo_guide_price
              that.parameter1[3]['value' + (index + 1)] = list.mo_vendor
              that.parameter1[4]['value' + (index + 1)] = list.mo_engine
              that.parameter1[5]['value' + (index + 1)] = list.mo_gearbox
              that.parameter1[6]['value' + (index + 1)] = list.mo_displacement
              that.parameter1[7]['value' + (index + 1)] = list.mo_size
              that.parameter1[8]['value' + (index + 1)] = list.mo_car_structure
              that.parameter1[9]['value' + (index + 1)] = list.mo_maximum_speed
              that.parameter1[10]['value' + (index + 1)] = list.mo_acceleration_time
              that.parameter1[11]['value' + (index + 1)] = list.mo_oil
              // 车身
              that.parameter2[0]['value' + (index + 1)] = list.mo_length
              that.parameter2[1]['value' + (index + 1)] = list.mo_width
              that.parameter2[2]['value' + (index + 1)] = list.mo_height
              that.parameter2[3]['value' + (index + 1)] = list.mo_wheelbase
              that.parameter2[4]['value' + (index + 1)] = list.mo_front_gauge
              that.parameter2[5]['value' + (index + 1)] = list.mo_track_rear
              that.parameter2[6]['value' + (index + 1)] = list.mo_front_head_space
              that.parameter2[7]['value' + (index + 1)] = list.mo_second_head_space
              that.parameter2[8]['value' + (index + 1)] = list.mo_front_bear_space
              that.parameter2[9]['value' + (index + 1)] = list.mo_second_bear_space
              that.parameter2[10]['value' + (index + 1)] = list.mo_curb_weight
              that.parameter2[11]['value' + (index + 1)] = list.mo_car_structure
              that.parameter2[12]['value' + (index + 1)] = list.mo_car_texture
              that.parameter2[13]['value' + (index + 1)] = list.mo_door_number
              that.parameter2[14]['value' + (index + 1)] = list.mo_seat_number
              that.parameter2[15]['value' + (index + 1)] = list.mo_door_open
              that.parameter2[16]['value' + (index + 1)] = list.mo_tank_volume
              that.parameter2[17]['value' + (index + 1)] = list.mo_second_tank
              that.parameter2[18]['value' + (index + 1)] = list.mo_container_size
              // 发动机
              that.parameter3[0]['value' + (index + 1)] = list.mo_engine_displacement
              that.parameter3[1]['value' + (index + 1)] = list.mo_intake_type
              that.parameter3[2]['value' + (index + 1)] = list.mo_cylinder_arrangement_type
              that.parameter3[3]['value' + (index + 1)] = list.mo_cylinder_number
              that.parameter3[4]['value' + (index + 1)] = list.mo_valve_number
              that.parameter3[5]['value' + (index + 1)] = list.mo_valve_mechanism
              that.parameter3[6]['value' + (index + 1)] = list.mo_max_soup
              that.parameter3[7]['value' + (index + 1)] = list.mo_max_power
              that.parameter3[8]['value' + (index + 1)] = list.mo_max_power_speed
              that.parameter3[9]['value' + (index + 1)] = list.mo_max_torque
              that.parameter3[10]['value' + (index + 1)] = list.mo_max_torque_speed
              that.parameter3[11]['value' + (index + 1)] = list.mo_fuel_type
              that.parameter3[12]['value' + (index + 1)] = list.mo_oil_supply
              that.parameter3[13]['value' + (index + 1)] = list.mo_head_material
              that.parameter3[14]['value' + (index + 1)] = list.mo_body_material
              // 变速箱
              that.parameter4[0]['value' + (index + 1)] = list.mo_gearbox
              that.parameter4[1]['value' + (index + 1)] = list.mo_gear_number
              that.parameter4[2]['value' + (index + 1)] = list.mo_gearbox_type
              // 底盘转向
              that.parameter5[0]['value' + (index + 1)] = list.mo_drive_type
              that.parameter5[1]['value' + (index + 1)] = list.mo_drive_form
              that.parameter5[2]['value' + (index + 1)] = list.mo_centre_differential_structure
              that.parameter5[3]['value' + (index + 1)] = list.mo_front_suspension_type
              that.parameter5[4]['value' + (index + 1)] = list.mo_after_suspension_type
              that.parameter5[5]['value' + (index + 1)] = list.mo_help_type
              that.parameter5[6]['value' + (index + 1)] = list.mo_car_body_structure
              // 车轮制动
              that.parameter6[0]['value' + (index + 1)] = list.mo_front_brake_type
              that.parameter6[1]['value' + (index + 1)] = list.mo_after_brake_type
              that.parameter6[2]['value' + (index + 1)] = list.mo_parking_brake_type
              that.parameter6[3]['value' + (index + 1)] = list.mo_front_tire_type
              that.parameter6[4]['value' + (index + 1)] = list.mo_after_tire_type
              that.parameter6[5]['value' + (index + 1)] = list.mo_spare_tire_type
              // 安全装备
              that.parameter7[0]['value' + (index + 1)] = list.mo_main_driving_airbag
              that.parameter7[1]['value' + (index + 1)] = list.mo_vice_driving_airbag
              that.parameter7[2]['value' + (index + 1)] = list.mo_front_side_airbag
              that.parameter7[3]['value' + (index + 1)] = list.mo_after_side_airbag
              that.parameter7[4]['value' + (index + 1)] = list.mo_front_airbag
              that.parameter7[5]['value' + (index + 1)] = list.mo_after_airbag
              that.parameter7[6]['value' + (index + 1)] = list.mo_knee_airbag
              that.parameter7[7]['value' + (index + 1)] = list.mo_after_belt_bag
              that.parameter7[8]['value' + (index + 1)] = list.mo_pressure_monitoring_device
              that.parameter7[9]['value' + (index + 1)] = list.mo_zero_tire_pressure
              that.parameter7[10]['value' + (index + 1)] = list.mo_seat_belt_unprompted
              that.parameter7[11]['value' + (index + 1)] = list.mo_child_seat
              that.parameter7[12]['value' + (index + 1)] = list.mo_electronic_engine_security
              that.parameter7[13]['value' + (index + 1)] = list.mo_car_interior_lock
              that.parameter7[14]['value' + (index + 1)] = list.mo_remote_key
              that.parameter7[15]['value' + (index + 1)] = list.mo_keyless_boot_system
              that.parameter7[16]['value' + (index + 1)] = list.mo_keyless_enter_system
              // 操控配置
              that.parameter8[0]['value' + (index + 1)] = list.mo_abs_antilock
              that.parameter8[1]['value' + (index + 1)] = list.mo_power_distribution
              that.parameter8[2]['value' + (index + 1)] = list.mo_brake_assist
              that.parameter8[3]['value' + (index + 1)] = list.mo_traction_control
              that.parameter8[4]['value' + (index + 1)] = list.mo_stability_control
              that.parameter8[5]['value' + (index + 1)] = list.mo_auto_hold
              that.parameter8[6]['value' + (index + 1)] = list.mo_variable_suspension
              that.parameter8[7]['value' + (index + 1)] = list.mo_air_suspension
              that.parameter8[8]['value' + (index + 1)] = list.mo_multi_terrain_driving_system
              that.parameter8[9]['value' + (index + 1)] = list.mo_front_axle_limit_slip_differential
              that.parameter8[10]['value' + (index + 1)] = list.mo_central_differential_lock
              that.parameter8[11]['value' + (index + 1)] = list.mo_after_axle_limit_slip_differential
              // 外部配置
              that.parameter9[0]['value' + (index + 1)] = list.mo_power_sunroof
              that.parameter9[1]['value' + (index + 1)] = list.mo_panoramic_sunroof
              that.parameter9[2]['value' + (index + 1)] = list.mo_aluminum_alloy_rim
              that.parameter9[3]['value' + (index + 1)] = list.mo_electric_suction_door
              that.parameter9[4]['value' + (index + 1)] = list.mo_sliding_door
              that.parameter9[5]['value' + (index + 1)] = list.mo_electric_trunk
              that.parameter9[6]['value' + (index + 1)] = list.mo_trunk_opens_remotely
              that.parameter9[7]['value' + (index + 1)] = list.mo_sensing_trunk
              that.parameter9[8]['value' + (index + 1)] = list.mo_roof_rack
              that.parameter9[9]['value' + (index + 1)] = list.mo_lateral_pedal
              that.parameter9[10]['value' + (index + 1)] = list.mo_metallic_paint
              // 内部配置
              that.parameter10[0]['value' + (index + 1)] = list.mo_leather_steering_wheel
              that.parameter10[1]['value' + (index + 1)] = list.mo_steering_adjustment
              that.parameter10[2]['value' + (index + 1)] = list.mo_steering_wheel_electric
              that.parameter10[3]['value' + (index + 1)] = list.mo_flexo_steering
              that.parameter10[4]['value' + (index + 1)] = list.mo_steering_shift
              that.parameter10[5]['value' + (index + 1)] = list.mo_steering_heating
              that.parameter10[6]['value' + (index + 1)] = list.mo_steering_memory
              that.parameter10[7]['value' + (index + 1)] = list.mo_real_wood_trim
              that.parameter10[8]['value' + (index + 1)] = list.mo_cruise_control
              that.parameter10[9]['value' + (index + 1)] = list.mo_front_parking_radar
              that.parameter10[10]['value' + (index + 1)] = list.mo_after_parking_radar
              that.parameter10[11]['value' + (index + 1)] = list.mo_reverse_video_image
              that.parameter10[12]['value' + (index + 1)] = list.mo_car_monitor
              that.parameter10[13]['value' + (index + 1)] = list.mo_full_LCD_panel
              that.parameter10[14]['value' + (index + 1)] = list.mo_HUD
              // 高科技配置
              that.parameter11[0]['value' + (index + 1)] = list.mo_automatic_parking
              that.parameter11[1]['value' + (index + 1)] = list.mo_engine_stop_technology
              that.parameter11[2]['value' + (index + 1)] = list.mo_doubling_auxiliary
              that.parameter11[3]['value' + (index + 1)] = list.mo_LDWS
              that.parameter11[4]['value' + (index + 1)] = list.mo_reverse_braking_system
              that.parameter11[5]['value' + (index + 1)] = list.mo_integral_active_steering
              that.parameter11[6]['value' + (index + 1)] = list.mo_night_vision_system
              that.parameter11[7]['value' + (index + 1)] = list.mo_linguatronic
              that.parameter11[8]['value' + (index + 1)] = list.mo_central_LCD
              that.parameter11[9]['value' + (index + 1)] = list.mo_auto_cruise
              that.parameter11[10]['value' + (index + 1)] = list.mo_panoramic_camera
              that.parameter11[11]['value' + (index + 1)] = list.mo_garage_door_open
              that.parameter11[12]['value' + (index + 1)] = list.mo_burglar_alarm
              // 座椅配置
              that.parameter12[0]['value' + (index + 1)] = list.mo_seat_material
              that.parameter12[1]['value' + (index + 1)] = list.mo_front_seat
              that.parameter12[2]['value' + (index + 1)] = list.mo_after_seat
              that.parameter12[3]['value' + (index + 1)] = list.mo_sports_style_seat
              that.parameter12[4]['value' + (index + 1)] = list.mo_seat_height_adjustment
              that.parameter12[5]['value' + (index + 1)] = list.mo_lumbar_support
              that.parameter12[6]['value' + (index + 1)] = list.mo_shoulders_support
              that.parameter12[7]['value' + (index + 1)] = list.mo_main_electric_adjustment
              that.parameter12[8]['value' + (index + 1)] = list.mo_vice_electric_adjustment
              that.parameter12[9]['value' + (index + 1)] = list.mo_second_platoon_seats
              that.parameter12[10]['value' + (index + 1)] = list.mo_after_electric_adjustment
              that.parameter12[11]['value' + (index + 1)] = list.mo_back_boss_key
              that.parameter12[12]['value' + (index + 1)] = list.mo_power_seat_memory
              that.parameter12[13]['value' + (index + 1)] = list.mo_after_seat_memory
              that.parameter12[14]['value' + (index + 1)] = list.mo_front_electric_headrest
              that.parameter12[15]['value' + (index + 1)] = list.mo_after_electric_headrest
              that.parameter12[16]['value' + (index + 1)] = list.mo_front_seat_heating
              that.parameter12[17]['value' + (index + 1)] = list.mo_after_seat_heating
              that.parameter12[18]['value' + (index + 1)] = list.mo_front_seat_ventilate
              that.parameter12[19]['value' + (index + 1)] = list.mo_after_seat_ventilate
              that.parameter12[20]['value' + (index + 1)] = list.mo_front_seat_massage
              that.parameter12[21]['value' + (index + 1)] = list.mo_after_seat_massage
              that.parameter12[22]['value' + (index + 1)] = list.mo_after_independent_seats
              that.parameter12[23]['value' + (index + 1)] = list.mo_after_seats_way_down
              that.parameter12[24]['value' + (index + 1)] = list.mo_third_row
              that.parameter12[25]['value' + (index + 1)] = list.mo_third_seats_way_down
              that.parameter12[26]['value' + (index + 1)] = list.mo_seats_demolition
              that.parameter12[27]['value' + (index + 1)] = list.mo_front_center_rail
              that.parameter12[28]['value' + (index + 1)] = list.mo_after_center_rail
              that.parameter12[29]['value' + (index + 1)] = list.mo_after_table
              that.parameter12[30]['value' + (index + 1)] = list.mo_after_caliper_splint
              that.parameter12[31]['value' + (index + 1)] = list.mo_after_cup_holder
              // 多媒体配置
              that.parameter13[0]['value' + (index + 1)] = list.mo_navigation
              that.parameter13[1]['value' + (index + 1)] = list.mo_location_interactive_service
              that.parameter13[2]['value' + (index + 1)] = list.mo_center_console_screen
              that.parameter13[3]['value' + (index + 1)] = list.mo_car_phone
              that.parameter13[4]['value' + (index + 1)] = list.mo_car_TV
              that.parameter13[5]['value' + (index + 1)] = list.mo_after_LCD
              that.parameter13[6]['value' + (index + 1)] = list.mo_external_source_interface
              that.parameter13[7]['value' + (index + 1)] = list.mo_CD_support
              that.parameter13[8]['value' + (index + 1)] = list.mo_speaker_brand
              // 灯光配置
              that.parameter14[0]['value' + (index + 1)] = list.mo_dipped_headlight
              that.parameter14[1]['value' + (index + 1)] = list.mo_high_beam
              that.parameter14[2]['value' + (index + 1)] = list.mo_stop_lamp
              that.parameter14[3]['value' + (index + 1)] = list.mo_day_light
              that.parameter14[4]['value' + (index + 1)] = list.mo_HID
              that.parameter14[5]['value' + (index + 1)] = list.mo_auto_light
              that.parameter14[6]['value' + (index + 1)] = list.mo_steering_light
              that.parameter14[7]['value' + (index + 1)] = list.mo_steering_head_lamp
              that.parameter14[8]['value' + (index + 1)] = list.mo_front_fog_lamp
              that.parameter14[9]['value' + (index + 1)] = list.mo_lamp_height
              that.parameter14[10]['value' + (index + 1)] = list.mo_headlamp_cleaning_device
              that.parameter14[11]['value' + (index + 1)] = list.mo_interior_atmosphere_lamp
              that.parameter14[12]['value' + (index + 1)] = list.mo_welcome_pedal_light
              that.parameter14[13]['value' + (index + 1)] = list.mo_headlamp_delayed
              // 玻璃/后视镜
              that.parameter15[0]['value' + (index + 1)] = list.mo_front_power_window
              that.parameter15[1]['value' + (index + 1)] = list.mo_after_power_window
              that.parameter15[2]['value' + (index + 1)] = list.mo_third_window
              that.parameter15[3]['value' + (index + 1)] = list.mo_window_clamp
              that.parameter15[4]['value' + (index + 1)] = list.mo_rearview_mirror_electric_adjustment
              that.parameter15[5]['value' + (index + 1)] = list.mo_rearview_mirror_heating
              that.parameter15[6]['value' + (index + 1)] = list.mo_in_anti_glare
              that.parameter15[7]['value' + (index + 1)] = list.mo_out_anti_glare
              that.parameter15[8]['value' + (index + 1)] = list.mo_after_electric_folding
              that.parameter15[9]['value' + (index + 1)] = list.mo_rearview_mirror_memory
              that.parameter15[10]['value' + (index + 1)] = list.mo_auto_reverse
              that.parameter15[11]['value' + (index + 1)] = list.mo_wind_sun_blind
              that.parameter15[12]['value' + (index + 1)] = list.mo_back_sun_blind
              that.parameter15[13]['value' + (index + 1)] = list.mo_side_privacy_glass
              that.parameter15[14]['value' + (index + 1)] = list.mo_sunshade_makeup
              that.parameter15[15]['value' + (index + 1)] = list.mo_rear_wiper
              that.parameter15[16]['value' + (index + 1)] = list.mo_sensing_windshield_wiper
              // 空调/冰箱
              that.parameter16[0]['value' + (index + 1)] = list.mo_conditioner_control
              that.parameter16[1]['value' + (index + 1)] = list.mo_independent_conditioning
              that.parameter16[2]['value' + (index + 1)] = list.mo_backseat_vent
              that.parameter16[3]['value' + (index + 1)] = list.mo_temperature_control
              that.parameter16[4]['value' + (index + 1)] = list.mo_independent_temperature_control
              that.parameter16[5]['value' + (index + 1)] = list.mo_air_conditioning
              that.parameter16[6]['value' + (index + 1)] = list.mo_car_refrigerator
            }
          }
        })
      },
      toCarP: function (index) {
        this.selectedCar[index].stageP = true
        this.selectedCar[index].stageS = false
        this.selectedCar[index].stageX = false
      },
      toCarS: function (index) {
        this.selectedCar[index].stageP = false
        this.selectedCar[index].stageS = true
        this.selectedCar[index].stageX = false
      },
      del: function (index) {
        this.selectedCar[index].img = '../../static/image/o_20.png'
        this.selectedCar[index].selected = false
        this.selectedCar[index].allowC = true
        this.selectedCar[index].choose = false
        this.selectedCar[index].stageP = false
        this.selectedCar[index].stageS = false
        this.selectedCar[index].stageX = false
        this.selectedCar[index].nameP = ''
        this.selectedCar[index].nameS = ''
        this.selectedCar[index].nameX = ''
        this.selectedCar[index].price = ''
        this.selectedCar[index].sid = -1
        this.selectedCar[index].text = '选择车型'
        this.selectedCar[index].lIndex = 0
        this.selectedCar[index].carPIndex = -1
        this.selectedCar[index].carSIndex = -1
        this.selectedCar[index].carXIndex = -1
        this.selectedCar[index].carSlist = []
        this.selectedCar[index].carXlist = []
        // this.selectedCar[index] = {
        //   img: '../../static/image/o_20.png',
        //   selected: false,
        //   name: '',
        //   allowC: true,
        //   choose: false,
        //   stageP: false,
        //   stageS: false,
        //   stageX: false,
        //   nameP: '',
        //   nameS: '',
        //   nameX: '',
        //   sid: -1,
        //   text: '选择车型',
        //   lIndex: 0,
        //   carPIndex: -1,
        //   carSIndex: -1,
        //   carXIndex: -1,
        //   carPlist: [],
        //   carSlist: [],
        //   carXlist: [],
        //   letteList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
        // }
        // this.selectedCar[index] = JSON.parse(JSON.stringify(this.selectedBak))
        for (let i in this.parameter1) {
          this.parameter1[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter2) {
          this.parameter2[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter3) {
          this.parameter3[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter4) {
          this.parameter4[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter5) {
          this.parameter5[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter6) {
          this.parameter6[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter7) {
          this.parameter7[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter8) {
          this.parameter8[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter9) {
          this.parameter9[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter10) {
          this.parameter10[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter11) {
          this.parameter11[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter12) {
          this.parameter12[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter13) {
          this.parameter13[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter14) {
          this.parameter14[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter15) {
          this.parameter15[i]['value' + (index + 1)] = ''
        }
        for (let i in this.parameter16) {
          this.parameter16[i]['value' + (index + 1)] = ''
        }
      },
      setCrumbs: function () {
        // let that = this
        let crumbs = []
        crumbs[0] = {
          title: '车型对比',
          link: ''
        }
        this.$store.commit('crumbs', crumbs)
      }
    },
    created () {
      this.getCarP()
      this.setCrumbs()
    },
    activated () {
      this.setCrumbs()
    }
  }
  $(window).scroll(function () {
    if ($(window).scrollTop() > 700) {
      $('.cars-box').addClass('suspension')
    } else {
      $('.cars-box').removeClass('suspension')
    }
  })
</script>
